import request from '@/utils/request'

// 查询列表
export function listInfo(query) {
  return request({
    url: '/business/room/list',
    method: 'get',
    params: query
  })
}
// 获取所有 私有配套
export function getPrivate() {
  return request({
    url: '/business/room/getPrivateFacilitieTypeList',
    method: 'get'
  })
}

// 获取所有 公共配套
export function getPublic() {
  return request({
    url: '/business/room/getPublicFacilitieTypeList',
    method: 'get'
  })
}

// 获取所有 用户
export function getUserList() {
  return request({
    url: '/business/room/getUserList',
    method: 'get'
  })
}
// 获取所有 公共配套
export function TbPremisesInfoList(name) {
  return request({
    url: '/business/room/PremisesByName/'+name,
    method: 'get'
  })
}
// 新增【请填写功能名称】
export function addHouse(data) {
  return request({
    url: '/business/room/addHouse',
    method: 'post',
    data: data
  })
}
// 新增【请填写功能名称】
export function addHousestyle(data) {
  return request({
    url: '/business/room/addHousestyle',
    method: 'post',
    data: data
  })
}
// 修改【请填写功能名称】
export function updateInfo(data) {
  return request({
    url: '/business/room',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delInfo(id) {
  return request({
    url: '/business/room/' + id,
    method: 'delete'
  })
}
//推荐房源
export function recommend(id) {
  return request({
    url: '/business/room/recommend/'+id+"/"+1,
    method: 'post'
  })
}

//取消房源
export function cancelRecommend(id) {
  return request({
    url: '/business/room/cancelRecommend/'+id+"/"+2,
    method: 'post'
  })
}
// 获取房态图
export function getFangTai(data) {
  return request({
    url: '/business/fatai/getFangTai',
    method: 'post',
    data: data
  })
}
